<?php
class userModel extends BaseModel
{   
    protected $table = 'user_admin';
    public function getUserInfoByName($username){
        if(empty($username)){
            return false;
        }
        $re = $this->where("username='{$username}'")->select();
        if(empty($re)){
            return array();
        }else {
            return $re[0];
        }
    }
    public function getUserInfoById($id){
        if(empty($id)){
            return false;
        }
        $re = $this->where("id='{$id}'")->select();
        if(empty($re)){
            return array();
        }else {
            return $re[0];
        }
    }
}